<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        var startID=null;
        function startName() {
            var arr = [
                "曾世昌",
                "徐太源",
                "郭远凡",
                "杨健",
                "杨开翔",
                "胡家宝",
                "潘可欣"
            ]
            var randomNum = Math.floor(Math.random() * 7);

            var showID= document.getElementById("showName");

            var showName = arr[randomNum];

            showID.innerHTML = showName;
            document.getElementById("startName").disabled=true;
            startID = setTimeout("startName();", 50);
        }

        function endName() {
            document.getElementById("startName").disabled=false;
            clearTimeout(startID)
        }
    </script>
</head>

<body>
<center>
    <div id="showName" style="margin-top: 100px; color: red; font-size: 30px;" >请点击开始 </div>
    <hr />
    <button onclick="startName();" id="startName" style="font-size: 20px; color: darkmagenta;">开始点名</button>&nbsp;&nbsp;&nbsp;&nbsp;
    <button onclick="endName()" id="endName" style="font-size: 20px; color: darkmagenta;">结束点名</button>
</center>
</body>
</head>
<body>

</body>
</html>